package com.yonyou.crm.base.attrgroup.rmimpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yonyou.crm.base.attrgroup.entity.AttrGroupVO;
import com.yonyou.crm.base.attrgroup.rmitf.IAttrGroupRmService;
import com.yonyou.crm.base.attrgroup.service.AttrGroupBizServiceImpl;
import com.yonyou.crm.common.page.entity.Page;

@Service("attrGroupService")
public class AttrGroupRmServiceImpl implements IAttrGroupRmService {

	@Autowired
	private AttrGroupBizServiceImpl service;

	@Override
	public Page<AttrGroupVO> page(Page<AttrGroupVO> page,
			Map<String, Object> paraMap) {
		return service.getPage(page, paraMap);
	}

	@Override
	public AttrGroupVO detail(Long id) {
		return service.getVOById(AttrGroupVO.class, id);
	}

	@Override
	public AttrGroupVO insert(AttrGroupVO vo) {
		return service.saveVO(vo);
	}

	@Override
	public AttrGroupVO update(AttrGroupVO vo) {
		return service.updateVO(vo);
	}

	@Override
	public String batchDelete(String[] ids) {
		return service.batchDelete(ids);
	}

	@Override
	public Page<AttrGroupVO> batchUpdateEnableState(String[] ids,
			Integer enableState, Page<AttrGroupVO> page,
			Map<String, Object> paraMap) {
		service.batchUpdateEnableState(ids, enableState);
		return service.getPage(page, paraMap);
	}
	
	@Override
	public boolean isCitedByProductOrPrdtype(Long attrGroupId) {
		return service.isCitedByProductOrPrdtype(attrGroupId);
	}
	
	@Override
	public List<AttrGroupVO> getRefList(Map<String, Object> paraMap) {
		return service.getRefList(paraMap);
	}
	
	@Override
	public Page<AttrGroupVO> getRefPage(Page<AttrGroupVO> page, Map<String, Object> paraMap) {
		return service.getRefPage(page, paraMap);
	}

	@Override
	public Map<String, Object> getCheckedAttr(Long attrGroupId) {
		return service.getCheckedAttr(attrGroupId);
	}

	@Override
	public Map<String, Object> getCheckedAttrValue(Long attrGroupId,
			Long attrId) {
		return service.getCheckedAttrValue(attrGroupId, attrId);
	}
	
}
